#ifndef __ERROR_H__
#define __ERROR_H__

#include <stdio.h>
#include "tree_dstruct.h"

#define	SET_STATUS(a)		{ if(status == 0) { status=a; } }
#define ERR(...)		printf("%s: ", __func__), printf(RED "Err: " CLR __VA_ARGS__), exit(128)

extern int status; /* declared in parser.y */

void err_sym_not_defined(char*, long, symbolt_t);
void err_sym_already_defined(symboll_t*, char*, long, symbolt_t);

#endif
